﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainFrm.Master" AutoEventWireup="true" CodeBehind="RubbishData.aspx.cs" Inherits="Ewts.Storage.RubbishData" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link rel="stylesheet" href="/css/tab4.css" type="text/css" />
         <link type="text/css" href="/css/tab1.css" rel="stylesheet" />
           <link type="text/css" href="/css/tab2.css" rel="stylesheet" />
           <style type="text/css">
               .tdright
               { text-align:right;}
               .tdleft
               { text-align:left; width:400px;}
               input
               { width:200px;}
               .loadRub{}
               .rubCode{}
               .rubName{}
               .tdcenter
               {
                   text-align:center;
                   }
                   .hiddenLoadID{}
               .style1
               {
                   text-align: right;
                   height: 17px;
               }
               .style2
               {
                   text-align: left;
                   width: 400px;
                   height: 17px;
               }
           </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="EwtsConext" runat="server">
<div>
    <h1>危废录入</h1>
    <input type="hidden" runat="server" id="hiddenLoadID" class="hiddenLoadID" />
    <input type="hidden" runat="server" id="hiddenRubID" class="hiddenRubID" />
    <input type="hidden" runat="server" id="rubhdataid" value="0" />
    <table id="tab" style="width:600px;">
    <tr>
        <td class="tdright">
            客户代码：
        </td>
        <td class="tdleft" id="tdCumCode" runat="server">
        </td>
    </tr>
    <tr>
        <td class="tdright">
            客户名称：
        </td>
        <td class="tdleft" id="tdCumName" runat="server">
        </td>
    </tr>
    <tr>
        <td class="style1">
            收集日期：
        </td>
        <td class="style2" id="tdCollDate" runat="server">
        </td>
    </tr>
  

   <tr>
        <td class="tdright">LoadNum号：</td>
        <td class="tdleft"><label id="loadRub" runat="server" class="loadRub"></label></td>
    </tr>
     <tr>
        <td class="tdright">危废编码：</td>
        <td class="tdleft">
            <asp:TextBox ID = "txtHWCode" CssClass = "rubCode" runat="server"></asp:TextBox>
        <input id="hidhwid" class="hidhwid" type="hidden" runat="server" />
            &nbsp;</td>
    </tr>
     <tr>
        <td class="tdright">危废名称：</td>
        <td class="tdleft">
                <label id="labrubName" class="rubName" runat="server"/>
                <input id="hidHwName" type="hidden" runat="server" class="hidHwName" />
        </td>
        
    </tr>
      <tr>
        <td class="tdright">危废重量：</td>
        <td class="tdleft"><input runat="server" id="rubWeight" class="rubWeight" /></td>
    </tr>
      <tr>
        <td class="tdright">联单号：</td>
        <td class="tdleft"><input runat="server" id="txtLDH" class="txtLDH" /></td>
    </tr>

      <tr>
        <td class="tdright">备注：</td>
        <td class="tdleft"><input runat="server" id="txtRemark" class="txtRemark" /></td>
    </tr>
  <tr>
        <td colspan="2" class="tdcenter">  
            <asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" />
        </td>
    </tr>
    
   </table>
   <script type="text/javascript">
       $(document).ready(function () {
           $('.rubCode').autocomplete({
               source: function (request, response) {
                   $.ajax({
                       url: "/ashx/Autocomplete.ashx",
                       data: { "goods": $(".rubCode").val(), "type": "hw" },
                       dataType: "json",
                       success: function (data) {
                           response($.map(data, function (item) {
                               return {
                                   label: item.label + " " + item.value,
                                   value: item.value,
                                   lab: item.label,
                                   rubid: item.rubid
                               }
                           }));
                       },
                       error: function (result, status) {
                           alert('请输入正确的危废编码');
                       }
                   })

               },
               select: function (event, ui) {
                   $(".rubCode").val(ui.item.lab);
                   $(".rubName").html(ui.item.value);
                   $(".hidHwName").val(ui.item.value);
                   $(".hidhwid").val(ui.item.rubid);
                   return false;
               },

               minLength: "1"
           });
       });
    </script>
 
</div>
</asp:Content>
